using System;
using System.Collections.Generic;
using System.Text;

namespace Impact.Views
{
    /// <summary>
    /// interface for a view that will be displaying content
    /// </summary>
    public interface IContentView
    {

        /// <summary>
        /// event that is fired when the view is initializing
        /// </summary>
        event EventHandler PreInit;
        /// <summary>
        /// event that is fired when the view is loading
        /// </summary>
        event EventHandler PreLoad;

        /// <summary>
        /// this method is called when an object needs to be displayed on the view
        /// the implementing class must check the type of the datasource and act accordingly.
        /// </summary>
        /// <remarks>called during Page.OnInit</remarks>
        void ContentInit(string userControlSource, object dataSource);

        /// <summary>
        /// rendering of controls is performed on the view
        /// </summary>
        /// <remarks>called during Page.OnLoad</remarks>
        void ContentRender();

        /// <summary>
        /// displays the given error message on the view
        /// </summary>
        void ShowErrorMessage(string message);

        /// <summary>
        /// Gets or Sets the filename of the Master Page this page will be using
        /// </summary>
        string MasterPageFile
        {
            get;
            set;
        }
    }
}
